home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / clib / exec_protos.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  9KB  |  184 lines

  1. #ifndef  CLIB_EXEC_PROTOS_H
  2. #define  CLIB_EXEC_PROTOS_H
  3.  
  4. /*
  5. **    $VER: exec_protos.h 39.15 (1.10.93)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef  EXEC_TASKS_H
  18. #include <exec/tasks.h>
  19. #endif
  20. #ifndef EXEC_EXEC_H
  21. #include <exec/exec.h>
  22. #endif
  23.  
  24. /*------ misc ---------------------------------------------------------*/
  25. ULONG Supervisor( unsigned long (*userFunction)() );
  26. /*------ special patchable hooks to internal exec activity ------------*/
  27. /*------ module creation ----------------------------------------------*/
  28. void InitCode( unsigned long startClass, unsigned long version );
  29. void InitStruct( APTR initTable, APTR memory, unsigned long size );
  30. struct Library *MakeLibrary( APTR funcInit, APTR structInit,
  31.     unsigned long (*libInit)(), unsigned long dataSize,
  32.     unsigned long segList );
  33. void MakeFunctions( APTR target, APTR functionArray,
  34.     unsigned long funcDispBase );
  35. struct Resident *FindResident( UBYTE *name );
  36. APTR InitResident( struct Resident *resident, unsigned long segList );
  37. /*------ diagnostics --------------------------------------------------*/
  38. void Alert( unsigned long alertNum );
  39. void Debug( unsigned long flags );
  40. /*------ interrupts ---------------------------------------------------*/
  41. void Disable( void );
  42. void Enable( void );
  43. void Forbid( void );
  44. void Permit( void );
  45. ULONG SetSR( unsigned long newSR, unsigned long mask );
  46. APTR SuperState( void );
  47. void UserState( APTR sysStack );
  48. struct Interrupt *SetIntVector( long intNumber, struct Interrupt *interrupt );
  49. void AddIntServer( long intNumber, struct Interrupt *interrupt );
  50. void RemIntServer( long intNumber, struct Interrupt *interrupt );
  51. void Cause( struct Interrupt *interrupt );
  52. /*------ memory allocation --------------------------------------------*/
  53. APTR Allocate( struct MemHeader *freeList, unsigned long byteSize );
  54. void Deallocate( struct MemHeader *freeList, APTR memoryBlock,
  55.     unsigned long byteSize );
  56. APTR AllocMem( unsigned long byteSize, unsigned long requirements );
  57. APTR AllocAbs( unsigned long byteSize, APTR location );
  58. void FreeMem( APTR memoryBlock, unsigned long byteSize );
  59. ULONG AvailMem( unsigned long requirements );
  60. struct MemList *AllocEntry( struct MemList *entry );
  61. void FreeEntry( struct MemList *entry );
  62. /*------ lists --------------------------------------------------------*/
  63. void Insert( struct List *list, struct Node *node, struct Node *pred );
  64. void AddHead( struct List *list, struct Node *node );
  65. void AddTail( struct List *list, struct Node *node );
  66. void Remove( struct Node *node );
  67. struct Node *RemHead( struct List *list );
  68. struct Node *RemTail( struct List *list );
  69. void Enqueue( struct List *list, struct Node *node );
  70. struct Node *FindName( struct List *list, UBYTE *name );
  71. /*------ tasks --------------------------------------------------------*/
  72. APTR AddTask( struct Task *task, APTR initPC, APTR finalPC );
  73. void RemTask( struct Task *task );
  74. struct Task *FindTask( UBYTE *name );
  75. BYTE SetTaskPri( struct Task *task, long priority );
  76. ULONG SetSignal( unsigned long newSignals, unsigned long signalSet );
  77. ULONG SetExcept( unsigned long newSignals, unsigned long signalSet );
  78. ULONG Wait( unsigned long signalSet );
  79. void Signal( struct Task *task, unsigned long signalSet );
  80. BYTE AllocSignal( long signalNum );
  81. void FreeSignal( long signalNum );
  82. LONG AllocTrap( long trapNum );
  83. void FreeTrap( long trapNum );
  84. /*------ messages -----------------------------------------------------*/
  85. void AddPort( struct MsgPort *port );
  86. void RemPort( struct MsgPort *port );
  87. void PutMsg( struct MsgPort *port, struct Message *message );
  88. struct Message *GetMsg( struct MsgPort *port );
  89. void ReplyMsg( struct Message *message );
  90. struct Message *WaitPort( struct MsgPort *port );
  91. struct MsgPort *FindPort( UBYTE *name );
  92. /*------ libraries ----------------------------------------------------*/
  93. void AddLibrary( struct Library *library );
  94. void RemLibrary( struct Library *library );
  95. struct Library *OldOpenLibrary( UBYTE *libName );
  96. void CloseLibrary( struct Library *library );
  97. APTR SetFunction( struct Library *library, long funcOffset,
  98.     unsigned long (*newFunction)() );
  99. void SumLibrary( struct Library *library );
  100. /*------ devices ------------------------------------------------------*/
  101. void AddDevice( struct Device *device );
  102. void RemDevice( struct Device *device );
  103. BYTE OpenDevice( UBYTE *devName, unsigned long unit,
  104.     struct IORequest *ioRequest, unsigned long flags );
  105. void CloseDevice( struct IORequest *ioRequest );
  106. BYTE DoIO( struct IORequest *ioRequest );
  107. void SendIO( struct IORequest *ioRequest );
  108. struct IORequest *CheckIO( struct IORequest *ioRequest );
  109. BYTE WaitIO( struct IORequest *ioRequest );
  110. void AbortIO( struct IORequest *ioRequest );
  111. /*------ resources ----------------------------------------------------*/
  112. void AddResource( APTR resource );
  113. void RemResource( APTR resource );
  114. APTR OpenResource( UBYTE *resName );
  115. /*------ private diagnostic support -----------------------------------*/
  116. /*------ misc ---------------------------------------------------------*/
  117. APTR RawDoFmt( UBYTE *formatString, APTR dataStream, void (*putChProc)(),
  118.     APTR putChData );
  119. ULONG GetCC( void );
  120. ULONG TypeOfMem( APTR address );
  121. ULONG Procure( struct SignalSemaphore *sigSem,
  122.     struct SemaphoreMessage *bidMsg );
  123. void Vacate( struct SignalSemaphore *sigSem,
  124.     struct SemaphoreMessage *bidMsg );
  125. struct Library *OpenLibrary( UBYTE *libName, unsigned long version );
  126. /*--- functions in V33 or higher (Release 1.2) ---*/
  127. /*------ signal semaphores (note funny registers)----------------------*/
  128. void InitSemaphore( struct SignalSemaphore *sigSem );
  129. void ObtainSemaphore( struct SignalSemaphore *sigSem );
  130. void ReleaseSemaphore( struct SignalSemaphore *sigSem );
  131. ULONG AttemptSemaphore( struct SignalSemaphore *sigSem );
  132. void ObtainSemaphoreList( struct List *sigSem );
  133. void ReleaseSemaphoreList( struct List *sigSem );
  134. struct SignalSemaphore *FindSemaphore( UBYTE *sigSem );
  135. void AddSemaphore( struct SignalSemaphore *sigSem );
  136. void RemSemaphore( struct SignalSemaphore *sigSem );
  137. /*------ kickmem support ----------------------------------------------*/
  138. ULONG SumKickData( void );
  139. /*------ more memory support ------------------------------------------*/
  140. void AddMemList( unsigned long size, unsigned long attributes, long pri,
  141.     APTR base, UBYTE *name );
  142. void CopyMem( APTR source, APTR dest, unsigned long size );
  143. void CopyMemQuick( APTR source, APTR dest, unsigned long size );
  144. /*------ cache --------------------------------------------------------*/
  145. /*--- functions in V36 or higher (Release 2.0) ---*/
  146. void CacheClearU( void );
  147. void CacheClearE( APTR address, unsigned long length, unsigned long caches );
  148. ULONG CacheControl( unsigned long cacheBits, unsigned long cacheMask );
  149. /*------ misc ---------------------------------------------------------*/
  150. APTR CreateIORequest( struct MsgPort *port, unsigned long size );
  151. void DeleteIORequest( APTR iorequest );
  152. struct MsgPort *CreateMsgPort( void );
  153. void DeleteMsgPort( struct MsgPort *port );
  154. void ObtainSemaphoreShared( struct SignalSemaphore *sigSem );
  155. /*------ even more memory support -------------------------------------*/
  156. APTR AllocVec( unsigned long byteSize, unsigned long requirements );
  157. void FreeVec( APTR memoryBlock );
  158. /*------ V39 Pool LVOs...*/
  159. APTR CreatePool( unsigned long requirements, unsigned long puddleSize,
  160.     unsigned long threshSize );
  161. void DeletePool( APTR poolHeader );
  162. APTR AllocPooled( APTR poolHeader, unsigned long memSize );
  163. void FreePooled( APTR poolHeader, APTR memory, unsigned long memSize );
  164. /*------ misc ---------------------------------------------------------*/
  165. ULONG AttemptSemaphoreShared( struct SignalSemaphore *sigSem );
  166. void ColdReboot( void );
  167. void StackSwap( struct StackSwapStruct *newStack );
  168. /*------ task trees ---------------------------------------------------*/
  169. void ChildFree( APTR tid );
  170. void ChildOrphan( APTR tid );
  171. void ChildStatus( APTR tid );
  172. void ChildWait( APTR tid );
  173. /*------ future expansion ---------------------------------------------*/
  174. APTR CachePreDMA( APTR address, ULONG *length, unsigned long flags );
  175. void CachePostDMA( APTR address, ULONG *length, unsigned long flags );
  176. /*------ New, for V39*/
  177. /*--- functions in V39 or higher (Release 3) ---*/
  178. /*------ Low memory handler functions*/
  179. void AddMemHandler( struct Interrupt *memhand );
  180. void RemMemHandler( struct Interrupt *memhand );
  181. /*------ Function to attempt to obtain a Quick Interrupt Vector...*/
  182. ULONG ObtainQuickVector( APTR interruptCode );
  183. #endif     /* CLIB_EXEC_PROTOS_H */
  184.